<?php
include("../conn.php");
if($_REQUEST[id]){
	$query=mysql_query("UPDATE coupon set state=2  where couponid=".$_REQUEST[id]);
	if (mysql_affected_rows()>0) {
		echo json_encode(array('code' => 200,'msg' => "操作成功"));
		exit;
	}else{
			echo json_encode(array('code' => 100,'msg' => "操作失败"));
			exit;
	} 
}else{
	echo json_encode(array('code' => 100,'msg' => "未传参数"));
	exit;
}

?>